﻿<%@ Page Language="VB" MasterPageFile="~/masterpages/MaestraUtilerias.master" AutoEventWireup="false"
    CodeFile="_CatGeneral.aspx.vb" Inherits="Catalogo_CatGeneral" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="contenedor">
        <table align="center" width="300px">
            <tr>
                <td>
                    <p>
                        <br />
                        <asp:Label ID="lblCategoria" runat="server" Text="CATEGORIA :    " Font-Bold="True"></asp:Label>
                        <asp:DropDownList ID="ddlCategoria" runat="server" AutoPostBack="True" DataSourceID="odsCategoria"
                            DataTextField="catdesc" DataValueField="cattip">
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="odsCategoria" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
                            OldValuesParameterFormatString="original_{0}" SelectMethod="GetCategorias" TypeName="DataSet_ohlTableAdapters.categorias_catalogoTableAdapter"
                            UpdateMethod="Update">
                            <DeleteParameters>
                                <asp:Parameter Name="Original_cattip" Type="String" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="catdesc" Type="String" />
                                <asp:Parameter Name="Original_cattip" Type="String" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="cattip" Type="String" />
                                <asp:Parameter Name="catdesc" Type="String" />
                            </InsertParameters>
                        </asp:ObjectDataSource>
                    </p>
                    
                    <p>
                        <asp:GridView ID="gvCatGral" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            DataKeyNames="cattip,catcve" DataSourceID="odsCatGral" ForeColor="#333333" GridLines="None">
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <Columns>
                                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ButtonType="Image"
                                    CancelImageUrl="~/images/cancel.png" DeleteImageUrl="~/images/eliminar.gif" EditImageUrl="~/images/editar.gif"
                                    UpdateImageUrl="~/images/check14x13_blue.png" />
                                <asp:BoundField DataField="catcve" HeaderText="Clave" ReadOnly="True" SortExpression="catcve" />
                                <asp:BoundField DataField="catnom" HeaderText="Descripcion" SortExpression="catnom" />
                            </Columns>
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#999999" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                    </p>
                    <p>
                        <asp:ObjectDataSource ID="odsCatGral" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
                            OldValuesParameterFormatString="original_{0}" SelectMethod="GetCatGralBycattip"
                            TypeName="DataSet_ohlTableAdapters.catalogo_generalTableAdapter" UpdateMethod="Update">
                            <DeleteParameters>
                                <asp:Parameter Name="Original_cattip" Type="String" />
                                <asp:Parameter Name="Original_catcve" Type="String" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="catnom" Type="String" />
                                <asp:Parameter Name="Original_cattip" Type="String" />
                                <asp:Parameter Name="Original_catcve" Type="String" />
                            </UpdateParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlCategoria" DefaultValue="C" Name="cattip" PropertyName="SelectedValue"
                                    Type="String" />
                            </SelectParameters>
                            <InsertParameters>
                                <asp:Parameter Name="cattip" Type="String" />
                                <asp:Parameter Name="catcve" Type="String" />
                                <asp:Parameter Name="catnom" Type="String" />
                            </InsertParameters>
                        </asp:ObjectDataSource>
                    </p>
                    <p>
                    </p>
                    <p>
                    </p>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
